<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="lib/umd/single-spa.dev.js"></script>
    <a href="#/app1">app1</a>
    <a href="#/app2">app2</a>
    <script>
        singleSpa.registerApplication('app1',
            async () => {
                return {
                    bootstrap: async () => {
                        console.log('bootstrap1');
                    },
                    mount: async () => {
                        console.log('mount1');
                    },
                    unmount: async () => {
                        console.log('unmount1');
                    }
                }
            },
            location => location.hash.startsWith('#/app1'),
            { store: { name: 'xiaotianshi1' } }
        )
        singleSpa.registerApplication('app2',
            async () => {
                return {
                    bootstrap: async () => {
                        console.log('bootstrap2');
                    },
                    mount: async () => {
                        console.log('mount2');
                    },
                    unmount: async () => {
                        console.log('unmount2');
                    }
                }
            },
            location => location.hash.startsWith('#/app2'),
            { store: { name: 'xiaotianshi2' } }
        )
        singleSpa.start();
        
    </script>
</body>
</html>